package com.pro.controller;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import com.pro.service.JsKeyWordHeatStatisticsService;
import com.pro.pojo.JsKeyWords;
import com.pro.pojo.JsonData;



import java.util.List;

/**
 * @author cyj
 * @date 2022.1.30$ 21.45$
 * @content :
 */
@RestController
@RequestMapping("/JsKeyWordHeatStatistics")
public class JsKeyWordHeatStatisticsController {
    @Autowired
    private JsKeyWordHeatStatisticsService service;

    /**
     * @author cyj
     * @date 2022.1.30$ 21.45$
     * @content : 查看关键字热度统计
     */
    @RequestMapping("/selectKeyWords")
    public JsonData selectKeyWords(){
        List<JsKeyWords> jsSearchKeyWords = service.selectKeyWords();
        return jsSearchKeyWords!=null? JsonData.buildSuccess(jsSearchKeyWords): JsonData.buildError("服务端错误");
    }

}
